<script>
	import config from '@/app.config.js'
	import init from '@/utils/init.js'
	export default {
		onPageNotFound:function(e) {
			uni.redirectTo({
				url: config.error.url
			})
			console.log(config.error.url)
		},
		onLaunch: function() {
			// console.log('App Launch')
			// #ifdef H5
				var u = navigator.appVersion;
				var ua = window.navigator.userAgent.toLowerCase();
				console.log(ua)
				var mobile = !!u.match(/AppleWebKit.*Mobile.*/)
				var wx = ua.match(/MicroMessenger/i) == 'micromessenger'
				console.log(wx?'微信打开':'其他')
				if(wx) {
					alert("您当前在微信打开本页面，建议使用浏览器打开。")
				}else if(!mobile){
					// alert("该页面为手机端设计，建议使用手机端打开。")
				}
				
				init()
			// #endif
			
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		},
		globalData:{
			marks:[],
			kunnan:{
				kunnan:undefined,
				jbqk:undefined,
				income:undefined,
				familyInfo:undefined,
				autograph:undefined
			},
			parAutographStatus:false,
			stuAutographStatus:false,
			catch:false
		}
	}
</script>

<style lang="scss">
	@import "colorui/main.css";
	@import "colorui/icon.css";
	@import "uview-ui/index.scss";
	/*每个页面公共css */
	page {
		min-width: 320px;
		max-width: 640px;
		margin: 0 auto;
		background-color: #fff;
		font-size: 16px;
		font-family: -appple-system, Helvetica, sans-serif;
		line-height: 1.5;
		/* color: #666; */
	}
	
	.header_top {
		height: 45px;
		text-align: center;
		line-height: 45px;
		font-size: 18px;
		font-weight: 700;
		color: #fff;
		background-color: #3669f8;
		/* position: fixed; */
	}
	
	.status_bar {
		height: var(--status-bar-height);
		width: 100%;
	}
</style>
